const Router = require('koa-router')
const router = new Router({prefix: '/users'})
const {
    register,
    login,
    basics
} = require('../controller/user.controller')
const { auth } = require('../middleware/auth.middleware')
const { userValidator, verifyUser, cryptPassword, verifyLogin } = require('../middleware/user.middleware')
//注册
router.post('/register', userValidator, verifyUser, cryptPassword, register)
//登录
router.post('/login', userValidator, verifyLogin, login)
module.exports = router
